//
//  WBDemoViewController.swift
//  飞哥微博
//
//  Created by gary.liu on 16/12/24.
//  Copyright © 2016年 gary.liu. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseVC {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }

    func showNext() {
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController {
    
    // 重写父类的方法
    override func setupTableView() {
        super.setupTableView()
        
        // 系统自带的没有高亮的效果
        // navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: .plain, target: self, action: #selector(showNext))
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
    
}
